<!DOCTYPE html>
<html lang="zh-CN">
  <head>
  <meta charset="UTF-8">
  <meta 
    name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  <meta 
    http-equiv="X-UA-Compatible" 
    content="ie=edge">
  <meta 
    name="theme-color" 
    content="#fff" 
    id="theme-color">
  <meta 
    name="description" 
    content="hexoDemo用于介绍如何使用hexo">
  <link 
    rel="icon" 
    href="/">
  <title>05-HTML标签：字体标签和超链接</title>
  
    
      <meta 
        property="og:title" 
        content="05-HTML标签：字体标签和超链接">
    
    
      <meta 
        property="og:url" 
        content="https://zwl5670.gitee.io/2001/01/01/01-HTML/05-HTML%E6%A0%87%E7%AD%BE%EF%BC%9A%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE%E5%92%8C%E8%B6%85%E9%93%BE%E6%8E%A5/index.html">
    
    
      <meta 
        property="og:img" 
        content="https://img.songhn.com/img/Y67gdd.png">
    
    
      <meta 
        property="og:img" 
        content="hexoDemo用于介绍如何使用hexo">
    
    
      <meta 
        property="og:type" 
        content="article">
      <meta 
        property="og:article:published_time" 
        content="2001-01-01">
      <meta 
        property="og:article:modified_time" 
        content="2023-03-14">
      <meta 
        property="og:article:author" 
        content="zwl5670">
      
        
          <meta 
            property="og:article:tag" 
            content="HTML">
        
      
    
  
  
  <link rel="preload" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css" as="style" >
  <link rel="preload" href="//at.alicdn.com/t/font_1952792_89b4ac4k4up.css" as="style" >
  <link rel="preload" href="/css/main.css" as="style" >
  
  <link rel="modulepreload" href="//instant.page/5.1.0">
  
  <link rel="stylesheet" href="/css/main.css">
  
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1946621_i1kgafibvw.css">
  
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1952792_89b4ac4k4up.css">
  
  
  
    <link rel="stylesheet" href="/js/lib/lightbox/baguetteBox.min.css">
  
  <script>
    function loadScript(url, cb) {
      var script = document.createElement('script');
      script.src = url;
      if (cb) script.onload = cb;
      script.async = true;
      document.body.appendChild(script);
    }
    function loadCSS(href, data, attr) {
      var sheet = document.createElement('link');
      sheet.ref = 'stylesheet';
      sheet.href = href;
      sheet.dataset[data] = attr;
      document.head.appendChild(sheet);
    }
    function changeCSS(cssFile, data, attr) {
      var oldlink = document.querySelector(data);
      var newlink = document.createElement("link");
      newlink.setAttribute("rel", "stylesheet");
      newlink.setAttribute("href", cssFile);
      newlink.dataset.prism = attr;
      document.head.replaceChild(newlink, oldlink);
    }
  </script>
  
    
  
  <script>
    // control reverse button
    var reverseDarkList = {
      dark: 'light',
      light: 'dark'
    };
    var themeColor = {
      dark: '#1c1c1e',
      light: '#fff'
    }
    // get the data of css prefers-color-scheme
    var getCssMediaQuery = function() {
      return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
    };
    // reverse current darkmode setting function
    var reverseDarkModeSetting = function() {
      var setting = localStorage.getItem('user-color-scheme');
      if(reverseDarkList[setting]) {
        setting = reverseDarkList[setting];
      } else if(setting === null) {
        setting = reverseDarkList[getCssMediaQuery()];
      } else {
        return;
      }
      localStorage.setItem('user-color-scheme', setting);
      return setting;
    };
    // apply current darkmode setting
  </script>
  
    <script>
      var setDarkmode = function(mode) {
      var setting = mode || localStorage.getItem('user-color-scheme');
      if(setting === getCssMediaQuery()) {
        document.documentElement.removeAttribute('data-user-color-scheme');
        localStorage.removeItem('user-color-scheme');
        document.getElementById('theme-color').content = themeColor[setting];
        document.getElementById('theme-color').dataset.mode = setting;
      } else if(reverseDarkList[setting]) {
        document.documentElement.setAttribute('data-user-color-scheme', setting);
        document.getElementById('theme-color').content = themeColor[setting];
        document.getElementById('theme-color').dataset.mode = setting;
      } else {
        document.documentElement.removeAttribute('data-user-color-scheme');
        localStorage.removeItem('user-color-scheme');
        document.getElementById('theme-color').content = themeColor[getCssMediaQuery()];
        document.getElementById('theme-color').dataset.mode = getCssMediaQuery();
      }
    };
    setDarkmode();
    </script>
  
  
  
    <link rel="preload" href="/js/lib/lightbox/baguetteBox.min.js" as="script">
    <link rel="preload" href="/js/lib/lightbox/baguetteBox.min.css" as="style" >
  
  
    <link rel="preload" href="/js/lib/lozad.min.js" as="script">
  
  
  
  
  
  
<meta name="generator" content="Hexo 6.3.0"></head>

  <body>
    <div class="wrapper">
       
      <nav class="navbar">
  <div class="navbar-logo">
    <a class="navbar-logo-main" href="/">
      
      <span class="navbar-logo-dsc">前端面试</span>
      </a>
  </div>
  <div class="navbar-menu">
    
      <a 
        href="/" 
        class="navbar-menu-item">
        
          首页
        
      </a>
    
      <a 
        href="/archives" 
        class="navbar-menu-item">
        
          归档
        
      </a>
    
      <a 
        href="/tags" 
        class="navbar-menu-item">
        
          标签
        
      </a>
    
      <a 
        href="/categories" 
        class="navbar-menu-item">
        
          分类
        
      </a>
    
      <a 
        href="/about" 
        class="navbar-menu-item">
        
          关于
        
      </a>
    
      <a 
        href="/links" 
        class="navbar-menu-item">
        
          友链
        
      </a>
    
    <button 
      class="navbar-menu-item darknavbar navbar-menu-btn" 
      aria-label="Toggle dark mode"
      id="dark">
      <i class="iconfont icon-weather"></i>
    </button>
    <button 
      class="navbar-menu-item searchnavbar navbar-menu-btn" 
      aria-label="Toggle search"
      id="search">
      <!-- <i 
        class="iconfont icon-search" 
        style="font-size: 1.2rem; font-weight: 400;">
      </i> -->
      <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
        class="iconify iconify--ion" width="28" height="28" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512">
        <path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="28"
          d="M256 80a176 176 0 1 0 176 176A176 176 0 0 0 256 80Z"></path>
        <path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="28"
          d="M232 160a72 72 0 1 0 72 72a72 72 0 0 0-72-72Z"></path>
        <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="28"
          d="M283.64 283.64L336 336"></path>
      </svg>
    </button>
  </div>
</nav> 
      
      <div 
        id="local-search" 
        style="display: none">
        <input
          class="navbar-menu-item"
          id="search-input"
          placeholder="请输入搜索内容..." />
        <div id="search-content"></div>
      </div>
      
      <div class="section-wrap">
        <div class="container">
          <div class="columns">
            <aside class="left-column">
              
              <div class="card card-author">
                
  <img 
    src="https://img.songhn.com/img/Y67gdd.png" 
    class="author-img"
    width="88"
    height="88"
    alt="author avatar">

<p class="author-name">zwl5670</p>
<p class="author-description">前端学习资料</p>
<div class="author-message">
  <a 
    class="author-posts-count" 
    href="/archives">
    <span>215</span>
    <span>文章</span>
  </a>
  <a 
    class="author-categories-count" 
    href="/categories">
    <span>14</span>
    <span>分类</span>
  </a>
  <a 
    class="author-tags-count" 
    href="/tags">
    <span>14</span>
    <span>标签</span>
  </a>
</div>

              </div>
               <div class="sticky-tablet">
  
  
    <article class="display-when-two-columns spacer">
      <div class="card card-content toc-card">
        <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9C%AC%E6%96%87%E4%B8%BB%E8%A6%81%E5%86%85%E5%AE%B9"><span class="toc-text">本文主要内容</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE"><span class="toc-text">字体标签</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%89%B9%E6%AE%8A%E5%AD%97%E7%AC%A6%EF%BC%88%E8%BD%AC%E4%B9%89%E5%AD%97%E7%AC%A6%EF%BC%89"><span class="toc-text">特殊字符（转义字符）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%8B%E5%88%92%E7%BA%BF%E3%80%81%E4%B8%AD%E5%88%92%E7%BA%BF%E3%80%81%E6%96%9C%E4%BD%93"><span class="toc-text">下划线、中划线、斜体</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%B2%97%E4%BD%93%E6%A0%87%E7%AD%BE-lt-b-gt-%E6%88%96-lt-strong-gt-%EF%BC%88%E5%B7%B2%E5%BA%9F%E5%BC%83%EF%BC%89"><span class="toc-text">粗体标签&lt;b&gt;或&lt;strong&gt;（已废弃）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE-lt-font-gt-%EF%BC%88%E5%B7%B2%E5%BA%9F%E5%BC%83%EF%BC%89"><span class="toc-text">字体标签&lt;font&gt;（已废弃）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%8A%E6%A0%87-lt-sup-gt-%E4%B8%8B%E6%A0%87-lt-sub-gt"><span class="toc-text">上标&lt;sup&gt;   下标&lt;sub&gt;</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%89%E3%80%81%E8%B6%85%E9%93%BE%E6%8E%A5"><span class="toc-text">三、超链接</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1%E3%80%81%E5%A4%96%E9%83%A8%E9%93%BE%E6%8E%A5%EF%BC%9A%E9%93%BE%E6%8E%A5%E5%88%B0%E5%A4%96%E9%83%A8%E6%96%87%E4%BB%B6"><span class="toc-text">1、外部链接：链接到外部文件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2%E3%80%81%E9%94%9A%E9%93%BE%E6%8E%A5"><span class="toc-text">2、锚链接</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3%E3%80%81%E9%82%AE%E4%BB%B6%E9%93%BE%E6%8E%A5"><span class="toc-text">3、邮件链接</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%B6%85%E9%93%BE%E6%8E%A5%E7%9A%84%E5%B1%9E%E6%80%A7"><span class="toc-text">超链接的属性</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%A4%87%E6%B3%A81%EF%BC%9A%E5%88%86%E6%B8%85%E6%A5%9Aimg%E5%92%8Ca%E6%A0%87%E7%AD%BE%E7%9A%84%E5%90%84%E8%87%AA%E7%9A%84%E5%B1%9E%E6%80%A7"><span class="toc-text">备注1：分清楚img和a标签的各自的属性</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%A4%87%E6%B3%A82%EF%BC%9Aa%E6%98%AF%E4%B8%80%E4%B8%AA%E6%96%87%E6%9C%AC%E7%BA%A7%E7%9A%84%E6%A0%87%E7%AD%BE"><span class="toc-text">备注2：a是一个文本级的标签</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%88%91%E7%9A%84%E5%85%AC%E4%BC%97%E5%8F%B7"><span class="toc-text">我的公众号</span></a></li></ol>
      </div>
    </article>
  
  
  <article class="card card-content categories-widget">
    <div class="categories-card">
  <div class="categories-header">
    <i 
      class="iconfont icon-fenlei" 
      style="padding-right: 2px;">
    </i>分类
  </div>
  <div class="categories-list">
    
      <a href="/categories/%E5%89%8D%E7%AB%AF%E5%B7%A5%E5%85%B7/">
        <div class="categories-list-item">
          前端工具
          <span class="categories-list-item-badge">13</span>
        </div>
      </a>
    
      <a href="/categories/CSS%E5%9F%BA%E7%A1%80/">
        <div class="categories-list-item">
          CSS基础
          <span class="categories-list-item-badge">18</span>
        </div>
      </a>
    
      <a href="/categories/CSS%E8%BF%9B%E9%98%B6/">
        <div class="categories-list-item">
          CSS进阶
          <span class="categories-list-item-badge">9</span>
        </div>
      </a>
    
      <a href="/categories/HTML/">
        <div class="categories-list-item">
          HTML
          <span class="categories-list-item-badge">12</span>
        </div>
      </a>
    
      <a href="/categories/JS%E5%9F%BA%E7%A1%80/">
        <div class="categories-list-item">
          JS基础
          <span class="categories-list-item-badge">56</span>
        </div>
      </a>
    
      <a href="/categories/JS%E5%9F%BA%E7%A1%80ES6/">
        <div class="categories-list-item">
          JS基础ES6
          <span class="categories-list-item-badge">10</span>
        </div>
      </a>
    
      <a href="/categories/JS%E5%9F%BA%E7%A1%80%E5%BC%82%E6%AD%A5/">
        <div class="categories-list-item">
          JS基础异步
          <span class="categories-list-item-badge">11</span>
        </div>
      </a>
    
      <a href="/categories/JS%E8%BF%9B%E9%98%B6/">
        <div class="categories-list-item">
          JS进阶
          <span class="categories-list-item-badge">11</span>
        </div>
      </a>
    
      <a href="/categories/%E7%A7%BB%E5%8A%A8web/">
        <div class="categories-list-item">
          移动web
          <span class="categories-list-item-badge">3</span>
        </div>
      </a>
    
      <a href="/categories/CSS%E5%92%8CDOM/">
        <div class="categories-list-item">
          CSS和DOM
          <span class="categories-list-item-badge">6</span>
        </div>
      </a>
    
      <a href="/categories/Node/">
        <div class="categories-list-item">
          Node
          <span class="categories-list-item-badge">16</span>
        </div>
      </a>
    
      <a href="/categories/Vue%E5%9F%BA%E7%A1%80/">
        <div class="categories-list-item">
          Vue基础
          <span class="categories-list-item-badge">15</span>
        </div>
      </a>
    
      <a href="/categories/%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/">
        <div class="categories-list-item">
          性能优化
          <span class="categories-list-item-badge">7</span>
        </div>
      </a>
    
      <a href="/categories/%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%8C%96/">
        <div class="categories-list-item">
          前端工程化
          <span class="categories-list-item-badge">8</span>
        </div>
      </a>
    
  </div>
</div>
  </article>
  
  <article class="card card-content tags-widget">
    <div class="tags-card">
  <div class="tags-header">
    <i 
      class="iconfont icon-biaoqian" 
      style="padding-right: 2px;">
    </i>热门标签
  </div>
  <div class="tags-list">
    
      <a 
        href="/tags/JS%E5%9F%BA%E7%A1%80/" 
        title="JS基础">
        <div class="tags-list-item">JS基础</div>
      </a>
    
      <a 
        href="/tags/CSS%E5%9F%BA%E7%A1%80/" 
        title="CSS基础">
        <div class="tags-list-item">CSS基础</div>
      </a>
    
      <a 
        href="/tags/Node/" 
        title="Node">
        <div class="tags-list-item">Node</div>
      </a>
    
      <a 
        href="/tags/Vue%E5%9F%BA%E7%A1%80/" 
        title="Vue基础">
        <div class="tags-list-item">Vue基础</div>
      </a>
    
      <a 
        href="/tags/%E5%89%8D%E7%AB%AF%E5%B7%A5%E5%85%B7/" 
        title="前端工具">
        <div class="tags-list-item">前端工具</div>
      </a>
    
      <a 
        href="/tags/HTML/" 
        title="HTML">
        <div class="tags-list-item">HTML</div>
      </a>
    
      <a 
        href="/tags/JS%E8%BF%9B%E9%98%B6/" 
        title="JS进阶">
        <div class="tags-list-item">JS进阶</div>
      </a>
    
      <a 
        href="/tags/JS%E5%9F%BA%E7%A1%80%E5%BC%82%E6%AD%A5/" 
        title="JS基础异步">
        <div class="tags-list-item">JS基础异步</div>
      </a>
    
      <a 
        href="/tags/JS%E5%9F%BA%E7%A1%80ES6/" 
        title="JS基础ES6">
        <div class="tags-list-item">JS基础ES6</div>
      </a>
    
      <a 
        href="/tags/CSS%E8%BF%9B%E9%98%B6/" 
        title="CSS进阶">
        <div class="tags-list-item">CSS进阶</div>
      </a>
    
      <a 
        href="/tags/%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%8C%96/" 
        title="前端工程化">
        <div class="tags-list-item">前端工程化</div>
      </a>
    
      <a 
        href="/tags/%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/" 
        title="性能优化">
        <div class="tags-list-item">性能优化</div>
      </a>
    
      <a 
        href="/tags/CSS%E5%92%8CDOM/" 
        title="CSS和DOM">
        <div class="tags-list-item">CSS和DOM</div>
      </a>
    
      <a 
        href="/tags/%E7%A7%BB%E5%8A%A8web/" 
        title="移动web">
        <div class="tags-list-item">移动web</div>
      </a>
    
  </div>
</div>
  </article>
  
  
</div>
            </aside>
            <main class="main-column">
              
<article class="card card-content">
  <header>
    <h1 class="post-title">
      05-HTML标签：字体标签和超链接
    </h1>
  </header>
  <div class="post-meta post-show-meta">
    <time datetime="2000-12-31T16:00:00.000Z">
      <i 
        class="iconfont icon-calendar" 
        style="margin-right: 2px;">
      </i>
      <span>2001-01-01</span>
    </time>
    
      <span class="dot"></span>
      
        <a 
          href="/categories/HTML/" 
          class="post-meta-link">
          HTML
        </a>
      
    
    
      <span class="dot"></span>
      <span>1.7k 字</span>
    
  </div>
  
    <div 
      class="post-meta post-show-meta" 
      style="margin-top: -10px;">
      <div style="display: flex; align-items: center;">
        <i 
          class="iconfont icon-biaoqian" 
          style="margin-right: 2px; font-size: 1.15rem;">
        </i>
        
          
          <a 
            href="/tags/HTML/" 
            class="post-meta-link">
            HTML
          </a>
        
      </div>
    </div>
  
  </header>
  <div 
    id="section" 
    class="post-content">
    <p><ArticleTopAd></ArticleTopAd></p>
<h2 id="本文主要内容"><a href="#本文主要内容" class="headerlink" title="本文主要内容"></a>本文主要内容</h2><p>字体标签： <code>&lt;font&gt;</code>、 <code>&lt;b&gt;</code>、 <code>&lt;u&gt;</code> 、<code>&lt;sup&gt;</code> 、<code>&lt;sub&gt;</code></p>
<p>超链接 <code>&lt;a&gt;</code></p>
<h2 id="字体标签"><a href="#字体标签" class="headerlink" title="字体标签"></a>字体标签</h2><h3 id="特殊字符（转义字符）"><a href="#特殊字符（转义字符）" class="headerlink" title="特殊字符（转义字符）"></a>特殊字符（转义字符）</h3><ul>
<li><code>&amp;nbsp;</code>：空格	（non-breaking spacing，不断打空格）</li>
<li><code>&amp;lt;</code>：小于号<code>&lt;</code>（less than）</li>
<li><code>&amp;gt;</code>：大于号<code>&gt;</code>（greater than）</li>
<li><code>&amp;amp;</code>：符号<code>&amp;</code></li>
<li><code>&amp;quot;</code>：双引号</li>
<li><code>&amp;apos;</code>：单引号</li>
<li><code>&amp;copy;</code>：版权<code>©</code></li>
<li><code>&amp;trade;</code>：商标<code>™</code></li>
<li><code>&amp;#32464;</code>：文字<code>绐</code>。其实，<code>#32464</code>是汉字<code>绐</code>的unicode编码。</li>
</ul>
<p>比如说，你想把<code>&lt;p&gt;</code>作为一个文本在页面上显示，直接写<code>&lt;p&gt;</code>是肯定不行的，因为这代表的是一个段落标签，所以这里需要用到<strong>转义字符</strong>。应该这么写：</p>
<pre class="highlight"><span class="line">这是一个HTML语言的<span class="symbol">&amp;lt;</span>p<span class="symbol">&amp;gt;</span>标签</span><br></pre>
<p>正确的效果如下：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_11.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_11.png" class="lozad post-image"></p>
<p>错误的效果如下：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_12.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_12.png" class="lozad post-image"></p>
<p>其实我们只要记住前三个符号就行了，其他的在需要的时候查一下就行了。而且，EditPlus软件中是可以直接点击这些符号进行选择的：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_13.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_13.png" class="lozad post-image"></p>
<p>来一张表格，方便需要的时候查询：</p>
<table>
<thead>
<tr>
<th align="left">特殊字符</th>
<th align="left">描述</th>
<th align="left">字符的代码</th>
</tr>
</thead>
<tbody><tr>
<td align="left"></td>
<td align="left">空格符</td>
<td align="left"><code>&amp;nbsp;</code></td>
</tr>
<tr>
<td align="left">&lt;</td>
<td align="left">小于号</td>
<td align="left"><code>&amp;lt;</code></td>
</tr>
<tr>
<td align="left">&gt;</td>
<td align="left">大于号</td>
<td align="left"><code>&amp;gt;</code></td>
</tr>
<tr>
<td align="left">&amp;</td>
<td align="left">和号</td>
<td align="left"><code>&amp;amp;</code></td>
</tr>
<tr>
<td align="left">￥</td>
<td align="left">人民币</td>
<td align="left"><code>&amp;yen;</code></td>
</tr>
<tr>
<td align="left">©</td>
<td align="left">版权</td>
<td align="left"><code>&amp;copy;</code></td>
</tr>
<tr>
<td align="left">®</td>
<td align="left">注册商标</td>
<td align="left"><code>&amp;reg;</code></td>
</tr>
<tr>
<td align="left">°</td>
<td align="left">摄氏度</td>
<td align="left"><code>&amp;deg;</code></td>
</tr>
<tr>
<td align="left">±</td>
<td align="left">正负号</td>
<td align="left"><code>&amp;plusmn;</code></td>
</tr>
<tr>
<td align="left">×</td>
<td align="left">乘号</td>
<td align="left"><code>&amp;times;</code></td>
</tr>
<tr>
<td align="left">÷</td>
<td align="left">除号</td>
<td align="left"><code>&amp;divide;</code></td>
</tr>
<tr>
<td align="left">²</td>
<td align="left">平方2（上标2）</td>
<td align="left"><code>&amp;sup2;</code></td>
</tr>
<tr>
<td align="left">³</td>
<td align="left">立方3（上标3）</td>
<td align="left"><code>&amp;sup3;</code></td>
</tr>
</tbody></table>
<h3 id="下划线、中划线、斜体"><a href="#下划线、中划线、斜体" class="headerlink" title="下划线、中划线、斜体"></a>下划线、中划线、斜体</h3><ul>
<li><p><code>&lt;u&gt;</code>：下划线标记</p>
</li>
<li><p><code>&lt;s&gt;</code>或<code>&lt;del&gt;</code>：中划线标记（删除线）</p>
</li>
<li><p><code>&lt;i&gt;</code>或<code>&lt;em&gt;</code>：斜体标记</p>
</li>
</ul>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_15.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_15.png" class="lozad post-image"></p>
<p>上面的这几个标签，常用于做一些小装饰、小图标。比如：</p>
<p><img  srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/20180118_2340.png" class="lozad post-image"src="http://img.smyhvae.com/20180118_2340.png"></p>
<p>这张图中，我们通过查看京东网站的代码发现，箭头处的小图标都是用的标签<code>&lt;i&gt;</code>。</p>
<h3 id="粗体标签-lt-b-gt-或-lt-strong-gt-（已废弃）"><a href="#粗体标签-lt-b-gt-或-lt-strong-gt-（已废弃）" class="headerlink" title="粗体标签&lt;b&gt;或&lt;strong&gt;（已废弃）"></a>粗体标签<code>&lt;b&gt;</code>或<code>&lt;strong&gt;</code>（已废弃）</h3><p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_14.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_14.png" class="lozad post-image"></p>
<h3 id="字体标签-lt-font-gt-（已废弃）"><a href="#字体标签-lt-font-gt-（已废弃）" class="headerlink" title="字体标签&lt;font&gt;（已废弃）"></a>字体标签<code>&lt;font&gt;</code>（已废弃）</h3><p>属性：</p>
<ul>
<li><p><code>color=&quot;红色&quot;</code>或<code>color=&quot;#ff00cc&quot;</code>或<code>color=&quot;new rgb(0,0,255)&quot;</code>：设置字体颜色。<br>  设置方式：单词 \  #ff00cc \   rgb(0,0,255)</p>
</li>
<li><p><code>size</code>：设置字体大小。 取值范围只能是：1至7。取值时，如果取值大于7那就按照7来算，如果取值小于1那就按照1来算。如果想要更大的字体，那就只能通过css样式来解决。</p>
</li>
<li><p><code>face=&quot;微软雅黑&quot;</code>：设置字体类型。</p>
</li>
</ul>
<p>举例：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">font</span> <span class="attr">face</span>=<span class="string">&quot;微软雅黑&quot;</span> <span class="attr">color</span>=<span class="string">&quot;#FF0000&quot;</span> <span class="attr">size</span>=<span class="string">&quot;10&quot;</span>&gt;</span>vae<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_10.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_10.png" class="lozad post-image"></p>
<h3 id="上标-lt-sup-gt-下标-lt-sub-gt"><a href="#上标-lt-sup-gt-下标-lt-sub-gt" class="headerlink" title="上标&lt;sup&gt;   下标&lt;sub&gt;"></a>上标<code>&lt;sup&gt;</code>   下标<code>&lt;sub&gt;</code></h3><p>上小标这两个标签容易混淆，怎么记呢？这样记：<code>b</code>的意思是<code>bottom：底部</code><br>举例：</p>
<pre class="highlight"><span class="line">O<span class="tag">&lt;<span class="name">sup</span>&gt;</span>2<span class="tag">&lt;/<span class="name">sup</span>&gt;</span>    5<span class="tag">&lt;<span class="name">sub</span>&gt;</span>3<span class="tag">&lt;/<span class="name">sub</span>&gt;</span></span><br></pre>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_16.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_16.png" class="lozad post-image"></p>
<h2 id="三、超链接"><a href="#三、超链接" class="headerlink" title="三、超链接"></a>三、超链接</h2><p>超链接有三种形式，下面分别讲讲。</p>
<h3 id="1、外部链接：链接到外部文件"><a href="#1、外部链接：链接到外部文件" class="headerlink" title="1、外部链接：链接到外部文件"></a>1、外部链接：链接到外部文件</h3><p>举例：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;02页面.html&quot;</span>&gt;</span>点击进入另外一个文件<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>

<p>a是英语<code>anchor</code>“锚”的意思，就好像这个页面往另一个页面扔出了一个锚。是一个文本级的标签。</p>
<p>href（hypertext reference）：超文本地址。读作“喝瑞夫”，不要读作“喝夫”。</p>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_17.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_17.png" class="lozad post-image"></p>
<p>当然，我们也可以直接点进链接，访问一个网址。代码举例如下：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;http://www.baidu.com&quot;</span> <span class="attr">target</span>=<span class="string">&quot;_blank&quot;</span>&gt;</span>点我点我<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>

<h3 id="2、锚链接"><a href="#2、锚链接" class="headerlink" title="2、锚链接"></a>2、锚链接</h3><p><strong>锚链接</strong>：给超链接起一个名字，作用是<strong>在本页面或者其他页面的的不同位置进行跳转</strong>。比如说，在网页底部有一个向上箭头，点击箭头后回到顶部，这个就可以利用锚链接。</p>
<p>首先我们要创建一个<strong>锚点</strong>，也就是说，使用<code>name</code>属性或者<code>id</code>属性给那个特定的位置起个名字。效果如下：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_18.png" alt="Paste_Image.png" srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/2015-10-01-cnblogs_html_18.png" class="lozad post-image"></p>
<p>上图中解释：</p>
<p>第11行代码表示，顶部这个锚的名字叫做name1。<br>然后在底部设置超链接，点击时将回到顶部（此时，网页中的url的末尾也出现了<code>#name1</code>）。注意<strong>上图中红框部分的<code>#</code>号不要忘记了</strong>，表示跳到名为name1的特定位置，这是规定。如果少了<code>#</code>号，点击之后，就会跳到name1这个文件或者name1这个文件夹中去。</p>
<p>如果我们将上图中的第28行代码写成：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;a.html#name1&quot;</span>&gt;</span>回到顶部<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>

<p>那就表示，点击之后，跳转到<code>a.html</code>页面的<code>name1锚点</code>中去。</p>
<p>说明：name属性是HTML4.0以前使用的，id属性是HTML4.0后才开始使用。为了向前兼容，因此，name和id这两个属性都要写上，并且值是一样的。</p>
<h3 id="3、邮件链接"><a href="#3、邮件链接" class="headerlink" title="3、邮件链接"></a>3、邮件链接</h3><p>代码举例：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;mailto:xxx@163.com&quot;</span>&gt;</span>点击进入我的邮箱<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>

<p>效果：点击之后，会弹出outlook，作用不大。</p>
<h3 id="超链接的属性"><a href="#超链接的属性" class="headerlink" title="超链接的属性"></a>超链接的属性</h3><ul>
<li><code>href</code>：目标URL</li>
<li><code>title</code>：悬停文本。</li>
<li><code>name</code>：主要用于设置一个锚点的名称。</li>
<li><code>target</code>：告诉浏览器用什么方式来打开目标页面。<code>target</code>属性有以下几个值：<ul>
<li><code>_self</code>：在同一个网页中显示（默认值）</li>
<li><code>_blank</code>：<strong>在新的窗口中打开</strong>。</li>
<li><code>_parent</code>：在父窗口中显示</li>
<li><code>_top</code>：在顶级窗口中显示</li>
</ul>
</li>
</ul>
<p><code>title</code>属性举例：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;09_img.html&quot;</span> <span class="attr">title</span>=<span class="string">&quot;很好看哦&quot;</span>&gt;</span>结婚照<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>

<p>效果如下：</p>
<p><img  srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="http://img.smyhvae.com/20170630_1415.png" class="lozad post-image"src="http://img.smyhvae.com/20170630_1415.png"></p>
<p><code>target</code>属性举例：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;1.html&quot;</span> <span class="attr">title</span>=<span class="string">&quot;悬停文本&quot;</span> <span class="attr">target</span>=<span class="string">&quot;_blank&quot;</span>&gt;</span>链接的内容<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>

<p>blank就是“空白”的意思，就表示新建一个空白窗口。为啥有一个_ ，就是规定，无需解释。<br>也就是说，如果不写<code>target=”_blank”</code>那么就是在相同的标签页打开，如果写了<code>target=”_blank”</code>，就是在新的空白标签页中打开。</p>
<h4 id="备注1：分清楚img和a标签的各自的属性"><a href="#备注1：分清楚img和a标签的各自的属性" class="headerlink" title="备注1：分清楚img和a标签的各自的属性"></a>备注1：分清楚img和a标签的各自的属性</h4><p>区别如下：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">&quot;1.jpg&quot;</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;1.html&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>
<h4 id="备注2：a是一个文本级的标签"><a href="#备注2：a是一个文本级的标签" class="headerlink" title="备注2：a是一个文本级的标签"></a>备注2：a是一个文本级的标签</h4><p>比如一个段落中的所有文字都能够被点击，那么应该是p包裹a：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">p</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;&quot;</span>&gt;</span>段落段落段落段落段落段落<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br></pre>

<p>而不是a包裹p：</p>
<pre class="highlight"><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;&quot;</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">p</span>&gt;</span></span><br><span class="line">		段落段落段落段落段落段落</span><br><span class="line">	<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre>

<p>a的语义要小于p，a就是可以当做文本来处理，所以p里面相当于放的就是纯文字。</p>
<h2 id="我的公众号"><a href="#我的公众号" class="headerlink" title="我的公众号"></a>我的公众号</h2><p>想学习<strong>更多技能</strong>？不妨关注我的微信公众号：<strong>千古壹号</strong>（id：<code>qianguyihao</code>）。</p>
<p>扫一扫，你将发现另一个全新的世界，而这将是一场美丽的意外：</p>
<p><img  srcset="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3C/svg%3E" data-src="https://img.smyhvae.com/20200102.png" class="lozad post-image"src="https://img.smyhvae.com/20200102.png"></p>

  </div>
  <div>
    
      <div 
        class="post-note note-warning copyright" 
        style="margin-top: 42px">
        <p>
          <span style="font-weight: bold;">作者：</span><a 
            target="_blank" 
            rel="nofollow noopener noreferrer" 
            href="/about">
            zwl5670
          </a>
        </p>
        <p>
          <span style="font-weight: bold;">文章链接：</span><a 
            target="_blank" 
            rel="nofollow noopener noreferrer" 
            href="https://zwl5670.gitee.io/2001/01/01/01-HTML/05-HTML%E6%A0%87%E7%AD%BE%EF%BC%9A%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE%E5%92%8C%E8%B6%85%E9%93%BE%E6%8E%A5/">
            https://zwl5670.gitee.io/2001/01/01/01-HTML/05-HTML%E6%A0%87%E7%AD%BE%EF%BC%9A%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE%E5%92%8C%E8%B6%85%E9%93%BE%E6%8E%A5/
          </a>
        </p>
        <p><span style="font-weight: bold;">版权声明：</span>本博客所有文章除特别声明外，均采用<a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0 协议</a>。转载请注明出处！</p>
      </div>
    
  </div>
</article>
<div class="nav">
  
    <div class="nav-item-prev">
      <a 
        href="/2001/01/01/01-HTML/04-HTML%E6%A0%87%E7%AD%BE%EF%BC%9A%E6%8E%92%E7%89%88%E6%A0%87%E7%AD%BE/" 
        class="nav-link">
        <i class="iconfont icon-left nav-prev-icon"></i>
        <div>
          <div class="nav-label">上一篇</div>
          
            <div class="nav-title">04-HTML标签：排版标签 </div>
          
        </div>
      </a>
    </div>
  
  
    <div class="nav-item-next">
      <a 
        href="/2001/01/01/01-HTML/06-HTML%E6%A0%87%E7%AD%BE%EF%BC%9A%E5%9B%BE%E7%89%87%E6%A0%87%E7%AD%BE/" 
        class="nav-link">
        <div>
          <div class="nav-label">下一篇</div>
          
            <div class="nav-title">06-HTML标签：图片标签 </div>
          
        </div>
        <i class="iconfont icon-right nav-next-icon"></i>
      </a>
    </div>
  
</div>

<div 
  class="card card-content toc-card" 
  id="mobiletoc">
  <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9C%AC%E6%96%87%E4%B8%BB%E8%A6%81%E5%86%85%E5%AE%B9"><span class="toc-text">本文主要内容</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE"><span class="toc-text">字体标签</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%89%B9%E6%AE%8A%E5%AD%97%E7%AC%A6%EF%BC%88%E8%BD%AC%E4%B9%89%E5%AD%97%E7%AC%A6%EF%BC%89"><span class="toc-text">特殊字符（转义字符）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%8B%E5%88%92%E7%BA%BF%E3%80%81%E4%B8%AD%E5%88%92%E7%BA%BF%E3%80%81%E6%96%9C%E4%BD%93"><span class="toc-text">下划线、中划线、斜体</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%B2%97%E4%BD%93%E6%A0%87%E7%AD%BE-lt-b-gt-%E6%88%96-lt-strong-gt-%EF%BC%88%E5%B7%B2%E5%BA%9F%E5%BC%83%EF%BC%89"><span class="toc-text">粗体标签&lt;b&gt;或&lt;strong&gt;（已废弃）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE-lt-font-gt-%EF%BC%88%E5%B7%B2%E5%BA%9F%E5%BC%83%EF%BC%89"><span class="toc-text">字体标签&lt;font&gt;（已废弃）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%8A%E6%A0%87-lt-sup-gt-%E4%B8%8B%E6%A0%87-lt-sub-gt"><span class="toc-text">上标&lt;sup&gt;   下标&lt;sub&gt;</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%89%E3%80%81%E8%B6%85%E9%93%BE%E6%8E%A5"><span class="toc-text">三、超链接</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1%E3%80%81%E5%A4%96%E9%83%A8%E9%93%BE%E6%8E%A5%EF%BC%9A%E9%93%BE%E6%8E%A5%E5%88%B0%E5%A4%96%E9%83%A8%E6%96%87%E4%BB%B6"><span class="toc-text">1、外部链接：链接到外部文件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2%E3%80%81%E9%94%9A%E9%93%BE%E6%8E%A5"><span class="toc-text">2、锚链接</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3%E3%80%81%E9%82%AE%E4%BB%B6%E9%93%BE%E6%8E%A5"><span class="toc-text">3、邮件链接</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%B6%85%E9%93%BE%E6%8E%A5%E7%9A%84%E5%B1%9E%E6%80%A7"><span class="toc-text">超链接的属性</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%A4%87%E6%B3%A81%EF%BC%9A%E5%88%86%E6%B8%85%E6%A5%9Aimg%E5%92%8Ca%E6%A0%87%E7%AD%BE%E7%9A%84%E5%90%84%E8%87%AA%E7%9A%84%E5%B1%9E%E6%80%A7"><span class="toc-text">备注1：分清楚img和a标签的各自的属性</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%A4%87%E6%B3%A82%EF%BC%9Aa%E6%98%AF%E4%B8%80%E4%B8%AA%E6%96%87%E6%9C%AC%E7%BA%A7%E7%9A%84%E6%A0%87%E7%AD%BE"><span class="toc-text">备注2：a是一个文本级的标签</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%88%91%E7%9A%84%E5%85%AC%E4%BC%97%E5%8F%B7"><span class="toc-text">我的公众号</span></a></li></ol>
</div>
            </main>
            <aside class="right-column">
              <div class="sticky-widescreen">
  
  
    <article class="card card-content toc-card">
      <div class="toc-header">
  <i 
    class="iconfont icon-menu" 
    style="padding-right: 2px;">
  </i>目录
</div>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9C%AC%E6%96%87%E4%B8%BB%E8%A6%81%E5%86%85%E5%AE%B9"><span class="toc-text">本文主要内容</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE"><span class="toc-text">字体标签</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%89%B9%E6%AE%8A%E5%AD%97%E7%AC%A6%EF%BC%88%E8%BD%AC%E4%B9%89%E5%AD%97%E7%AC%A6%EF%BC%89"><span class="toc-text">特殊字符（转义字符）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%8B%E5%88%92%E7%BA%BF%E3%80%81%E4%B8%AD%E5%88%92%E7%BA%BF%E3%80%81%E6%96%9C%E4%BD%93"><span class="toc-text">下划线、中划线、斜体</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%B2%97%E4%BD%93%E6%A0%87%E7%AD%BE-lt-b-gt-%E6%88%96-lt-strong-gt-%EF%BC%88%E5%B7%B2%E5%BA%9F%E5%BC%83%EF%BC%89"><span class="toc-text">粗体标签&lt;b&gt;或&lt;strong&gt;（已废弃）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AD%97%E4%BD%93%E6%A0%87%E7%AD%BE-lt-font-gt-%EF%BC%88%E5%B7%B2%E5%BA%9F%E5%BC%83%EF%BC%89"><span class="toc-text">字体标签&lt;font&gt;（已废弃）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%8A%E6%A0%87-lt-sup-gt-%E4%B8%8B%E6%A0%87-lt-sub-gt"><span class="toc-text">上标&lt;sup&gt;   下标&lt;sub&gt;</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%89%E3%80%81%E8%B6%85%E9%93%BE%E6%8E%A5"><span class="toc-text">三、超链接</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1%E3%80%81%E5%A4%96%E9%83%A8%E9%93%BE%E6%8E%A5%EF%BC%9A%E9%93%BE%E6%8E%A5%E5%88%B0%E5%A4%96%E9%83%A8%E6%96%87%E4%BB%B6"><span class="toc-text">1、外部链接：链接到外部文件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2%E3%80%81%E9%94%9A%E9%93%BE%E6%8E%A5"><span class="toc-text">2、锚链接</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3%E3%80%81%E9%82%AE%E4%BB%B6%E9%93%BE%E6%8E%A5"><span class="toc-text">3、邮件链接</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%B6%85%E9%93%BE%E6%8E%A5%E7%9A%84%E5%B1%9E%E6%80%A7"><span class="toc-text">超链接的属性</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%A4%87%E6%B3%A81%EF%BC%9A%E5%88%86%E6%B8%85%E6%A5%9Aimg%E5%92%8Ca%E6%A0%87%E7%AD%BE%E7%9A%84%E5%90%84%E8%87%AA%E7%9A%84%E5%B1%9E%E6%80%A7"><span class="toc-text">备注1：分清楚img和a标签的各自的属性</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%A4%87%E6%B3%A82%EF%BC%9Aa%E6%98%AF%E4%B8%80%E4%B8%AA%E6%96%87%E6%9C%AC%E7%BA%A7%E7%9A%84%E6%A0%87%E7%AD%BE"><span class="toc-text">备注2：a是一个文本级的标签</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%88%91%E7%9A%84%E5%85%AC%E4%BC%97%E5%8F%B7"><span class="toc-text">我的公众号</span></a></li></ol>
    </article>
  
  
  <article class="card card-content">
    <div class="recent-posts-card">
  <div class="recent-posts-header">
    <i 
      class="iconfont icon-wenzhang_huaban" 
      style="padding-right: 2px;">
    </i>最近文章
  </div>
  <div class="recent-posts-list">
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2023-03-09</div>
        <a href="/2023/03/09/13-React%E5%9F%BA%E7%A1%80/11-React%20Navive%E5%88%9D%E8%AF%86/"><div class="recent-posts-item-content">11-React Navive初识</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2023-03-09</div>
        <a href="/2023/03/09/13-React%E5%9F%BA%E7%A1%80/10-AntD%E6%A1%86%E6%9E%B6%E7%9A%84upload%E7%BB%84%E4%BB%B6%E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87%E6%97%B6%E4%BD%BF%E7%94%A8customRequest%E6%96%B9%E6%B3%95%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%8A%E4%BC%A0%E8%A1%8C%E4%B8%BA/"><div class="recent-posts-item-content">10-AntD框架的upload组件上传图片时使用customRequest方法自定义上传行为</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2023-03-09</div>
        <a href="/2023/03/09/13-React%E5%9F%BA%E7%A1%80/09-AntD%E6%A1%86%E6%9E%B6%E7%9A%84upload%E7%BB%84%E4%BB%B6%E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87%E6%97%B6%E9%81%87%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E5%9D%91/"><div class="recent-posts-item-content">09-AntD框架的upload组件上传图片时遇到的一些坑</div></a>
      </div>
    
      <div class="recent-posts-item">
        <div class="recent-posts-item-title">2023-03-09</div>
        <a href="/2023/03/09/13-React%E5%9F%BA%E7%A1%80/08-Ant%20Design%E7%9A%84%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/"><div class="recent-posts-item-content">08-Ant Design的基本使用</div></a>
      </div>
    
  </div>
</div>
  </article>
  
  
</div>
            </aside>
          </div>
        </div>
      </div>
    </div>
     
    <footer class="footer">
  <div class="footer-container">
    <div>
      <div class="footer-dsc">
        <span>
          Copyright ©
          
            2023
          
          
        </span>
        &nbsp;
        <a 
          href="/" 
          class="footer-link">
          前端面试
        </a>
      </div>
    </div>

    
      <div class="footer-dsc">
        
          Powered by
          <a 
            href="https://hexo.io/" 
            class="footer-link" 
            target="_blank" 
            rel="nofollow noopener noreferrer">
            &nbsp;Hexo
          </a>
        
        
          <span>&nbsp;|&nbsp;</span>
        
        
          Theme -
          <a 
            href="https://github.com/theme-kaze" 
            class="footer-link" 
            target="_blank"
            rel="nofollow noopener noreferrer">
            &nbsp;Kaze
          </a>
        
      </div>
    
    
    
    
</footer>
 
    
  <a 
    role="button" 
    id="scrollbutton" 
    class="basebutton" 
    aria-label="回到顶部">
    <i class="iconfont icon-arrowleft button-icon"></i>
  </a>

<a 
  role="button" 
  id="menubutton"
  aria-label="menu button"
  class="basebutton">
  <i class="iconfont icon-menu button-icon"></i>
</a>
<a 
  role="button" 
  id="popbutton" 
  class="basebutton" 
  aria-label="控制中心">
  <i class="iconfont icon-expand button-icon"></i>
</a>
<a 
  role="button" 
  id="darkbutton" 
  class="basebutton darkwidget" 
  aria-label="夜色模式">
  <i class="iconfont icon-weather button-icon"></i>
</a>
<a 
  role="button" 
  id="searchbutton" 
  class="basebutton searchwidget" 
  aria-label="搜索">
  <i class="iconfont icon-search button-icon"></i>
</a> 
     
     
     
      <script>
  var addImgLayout = function () {
    var img = document.querySelectorAll('.post-content img')
    var i
    for (i = 0; i < img.length; i++) {
      var wrapper = document.createElement('a')
      wrapper.setAttribute('href', img[i].getAttribute('data-src'))
      wrapper.setAttribute('aria-label', 'illustration')
      wrapper.style.cssText =
        'width: 100%; display: flex; justify-content: center;'
      if (img[i].alt) wrapper.dataset.caption = img[i].alt
      wrapper.dataset.nolink = true
      img[i].before(wrapper)
      wrapper.append(img[i])
      var divWrap = document.createElement('div')
      divWrap.classList.add('gallery')
      wrapper.before(divWrap)
      divWrap.append(wrapper)
    }
    baguetteBox.run('.gallery')
  }
</script>
<script>
  loadScript(
    "/js/lib/lightbox/baguetteBox.min.js",
    addImgLayout
  )
</script>
 
     
     
    <script src="/js/main.js"></script> 
     
    
      <script>
        var addLazyload = function () {
          var observer = lozad('.lozad', {
            load: function (el) {
              el.srcset = el.getAttribute('data-src')
            },
            loaded: function (el) {
              el.classList.add('loaded')
            },
          })
          observer.observe()
        }
      </script>
      <script>
        loadScript('/js/lib/lozad.min.js', addLazyload)
      </script>
    
    <script src="//instant.page/5.1.0" type="module"
      integrity="sha384-by67kQnR+pyfy8yWP4kPO12fHKRLHZPfEsiSXR8u2IKcTdxD805MGUXBzVPnkLHw"></script>
    
    
  </body>
</html>
